<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>代码生成页</title>
    <script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <link rel="stylesheet" href="layui/css/layui.css"/>
    <style>
        .layui-form-label{
            width: 120px;
        }
        .layui-input-block {
            margin-left: 150px;
            min-height: 36px
        }
        label.required:after{
            content:"*";
            color:red;
            position: absolute;
            top:10px;
            right:5px;
        }
    </style>
</head>
<body>
<div style="padding: 20px; background-color: #F2F2F2;">
    <div class="layui-card">
        <div class="layui-card-header">生成配置（暂时仅支持mysql数据库）</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="/doGen" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label required">author</label>
                    <div class="layui-input-block">
                        <input type="text" name="author" required  lay-verify="required" placeholder="请输入代码作者" autocomplete="off" class="layui-input" value="${gen.author}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label required">packageName</label>
                    <div class="layui-input-block">
                        <input type="text" name="packageName" required lay-verify="required" placeholder="请输入parent包名" autocomplete="off" class="layui-input" value="${gen.packageName}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline layui-col-md5">
                        <label class="layui-form-label">entityPackageName</label>
                        <div class="layui-input-block">
                            <input type="text" name="entityPackageName" placeholder="请输入entity包名，为空使用models" autocomplete="off" class="layui-input" value="${gen.entityPackageName}">
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md5">
                        <label class="layui-form-label">daoPackageName</label>
                        <div class="layui-input-block">
                            <input type="text" name="daoPackageName" placeholder="请输入Dao包名，为空使用dao" autocomplete="off" class="layui-input" value="${gen.daoPackageName}">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label required">entityOutput</label>
                    <div class="layui-input-block">
                        <input type="text" name="entityOutput" required lay-verify="required" placeholder="请输入entity输出路径（绝对路径）" autocomplete="off" class="layui-input" value="${gen.entityOutput}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">daoOutput</label>
                    <div class="layui-input-block">
                        <input type="text" name="daoOutput" placeholder="请输入dao输出路径（绝对路径），为空使用entityOutput" autocomplete="off" class="layui-input" value="${gen.daoOutput}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">xmlOutput</label>
                    <div class="layui-input-block">
                        <input type="text" name="xmlOutput" placeholder="请输入xml输出路径（绝对路径），为空使用entityOutput" autocomplete="off" class="layui-input" value="${gen.xmlOutput}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline layui-col-md3">
                        <label class="layui-form-label required">tableName</label>
                        <div class="layui-input-block">
                            <input type="text" name="tableName" required  lay-verify="required" placeholder="请输入表名" autocomplete="off" class="layui-input" value="${gen.tableName}">
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md4">
                        <label class="layui-form-label">tablePrefix</label>
                        <div class="layui-input-block">
                            <input type="text" name="tablePrefix" placeholder="请输入表名前缀(为空则不处理)" autocomplete="off" class="layui-input" value="${gen.tablePrefix}">
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md4">
                        <label class="layui-form-label">fieldPrefix</label>
                        <div class="layui-input-block">
                            <input type="text" name="fieldPrefix" placeholder="请输入字段前缀(为空则不处理)" autocomplete="off" class="layui-input" value="${gen.fieldPrefix}">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label required">jdbc_url</label>
                    <div class="layui-input-block">
                        <input type="text" name="jdbcUrl" required  lay-verify="required" placeholder="请输入jdbc数据库连接" autocomplete="off" class="layui-input" value="${gen.jdbcUrl}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline layui-col-md5">
                        <label class="layui-form-label required">jdbc_username</label>
                        <div class="layui-input-block">
                            <input type="text" name="username" required  lay-verify="required" placeholder="请输入数据库密码" autocomplete="off" class="layui-input" value="${gen.username}">
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md5">
                        <label class="layui-form-label required">jdbc_password</label>
                        <div class="layui-input-block">
                            <input type="text" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" value="${gen.password}">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header">生成结果</div>
        <div class="layui-card-body" style="color: red">
            ${message}
        </div>
    </div>
</div>
</body>
</html>